﻿action_too_few_spouses = {
	priority = 900
	check_create_action = {
		if = {
			limit = {
				hp_accepts_polygamy = yes #Check if it also works for the tradition. If they don't lose piety, then it should only apply to the faith parameter
				allowed_more_spouses = yes
				is_adult = yes
				trigger_if = {
					limit = {
						primary_title.tier >= 5
					}
					any_spouse = {
						count < 4
					}
				}
				trigger_else_if = {
					limit = {
						primary_title.tier >= 4
					}
					any_spouse = {
						count < 3
					}
				}
				trigger_else_if = {
					limit = {
						primary_title.tier >= 3
					}
					any_spouse = {
						count < 2
					}
				}
				trigger_else = {
					any_spouse = {
						count < 1
					}
				}
				NOT = {
					has_government = landless_adventurer_government
				}
			}
			try_create_important_action = {
				important_action_type = action_too_few_spouses
			}
		}
	}

	effect = {
		open_interaction_window = {
			interaction = marry_off_interaction
			actor = root
			recipient = root
		}
	}
}
